<?php 
namespace app\install\controller;
class Common{

	protected $view;
	
	function __construct(){
		if (is_file(PROJECT_PATH . 'app/install.lock')) {
			echo \mylib\Response::html('请勿重复安装！');
			die;
		}
		$this -> view = new \mylib\View(\mylib\Config::get('view'));
	}

	protected function assign($data=[], $value=null){
		$this -> view -> assign($data, $value);
		return $this -> view;
	}

	protected function fetch($tpl=null, $data=[]){
		return $this -> view -> fetch($tpl, $data);
	}

	protected function html($html=''){
		return \mylib\Response::html($html);
	}
}